package com.ls.client;


import com.ls.entity.Result;
import com.ls.pojo.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * name指的是服务的名称，path指的是controller上面requestMapping对应的地址
 * */
@FeignClient(name = "ls-product",path = "/product")
public interface ProductFeignClient {

    @GetMapping("/{id}")
    public Result<Product> findById(@PathVariable Integer id);

    @GetMapping("/updateStock/{id}")
    public Result updateStockById(@PathVariable("id") Integer id, @RequestParam String token);




}
